<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>
<head>
  <title>prepare_headers (GData::Client::Base)</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
  <pre><span class="ruby-comment cmt"># File lib/gdata/client/base.rb, line 132</span>
      <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">prepare_headers</span>
        <span class="ruby-identifier">headers</span> = <span class="ruby-ivar">@headers</span>
        <span class="ruby-identifier">headers</span>[<span class="ruby-value str">'GData-Version'</span>] = <span class="ruby-ivar">@version</span>
        <span class="ruby-identifier">headers</span>[<span class="ruby-value str">'User-Agent'</span>] = <span class="ruby-constant">GData</span><span class="ruby-operator">::</span><span class="ruby-constant">Auth</span><span class="ruby-operator">::</span><span class="ruby-constant">SOURCE_LIB_STRING</span> <span class="ruby-operator">+</span> <span class="ruby-ivar">@source</span>
        <span class="ruby-comment cmt"># by default we assume we are sending Atom entries</span>
        <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">not</span> <span class="ruby-identifier">headers</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-value str">'Content-Type'</span>)
          <span class="ruby-identifier">headers</span>[<span class="ruby-value str">'Content-Type'</span>] = <span class="ruby-value str">'application/atom+xml'</span>
        <span class="ruby-keyword kw">end</span>
        <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">headers</span>
      <span class="ruby-keyword kw">end</span></pre>
</body>
</html>